package cn.cyb.server.config;

import org.springframework.web.servlet.config.annotation.ResourceHandlerRegistry;
import org.springframework.web.servlet.config.annotation.WebMvcConfigurationSupport;

/**
 * @author yuebo
 * @date 2024/12/24
 */
//@Configuration
public class StaticConfig extends WebMvcConfigurationSupport {

    /**
     * 解决/static/目录下静态资源找不到问题
     * @param registry
     */
    @Override
    protected void addResourceHandlers(ResourceHandlerRegistry registry) {
        registry.addResourceHandler("/static/**").addResourceLocations("classpath:/static/");
    }
}
